We will continue working with the same subset of data from the GESIS Panel Special Survey on the Coronavirus SARS-CoV-2 Outbreak in Germany as in the last exercise. If you have saved it while working on the previous exercise, you should be able to load it with the following command:
corona_survey <- readRDS("../data/gp_corona_subset.rds")
If you have not saved the dataframe, you need to run the full wrangling pipeline from the beginning of the previous exercise again.
In this exercise, we will look at more ways to (visually) explore the data.
age_cat variable (using ggplot2) with different colors for the different age groups.
geom_bar. This geom only requires the mapping of an x aes(thetic), but in this case we also want to specify a fill.
position of the bars to create a grouped bar plot.
geom_jitter() in addition to the geom_boxplot().
naniar package, create a plot showing the percentage of missing values for the variables on trust in different people and institutions.
gg_miss_var() function.
GGally package to create a compact visualisation of the distributions and relationships of the following variables: age_cat, education_cat, risk_self, risk_surround, sum_measures, mean_trust.
ggpairs().